package com.example.service;

import com.example.model.dto.TeamJoinRequestDTO;
import com.example.model.dto.TeamQuery;
import com.example.model.dto.TeamQuitRequestDTO;
import com.example.model.dto.TeamUpdateRequestDTO;
import com.example.model.po.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.model.po.User;
import com.example.model.vo.TeamUserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 队伍 服务类
 * </p>
 *
 * @author LinHui
 * @since 2024-04-19
 */
public interface ITeamService extends IService<Team> {


    /**
     *
     * 创建队伍
     *
     * @param team
     * @param logingUser
     * @return
     */
    long addTeam(Team team, User logingUser);



    List<TeamUserVO> listTeams(TeamQuery teamQuery, boolean isAdmin);

    /**
     *
     * 更新操作
     *
     * @param teamUpdateRequestDTO
     * @return
     */
    boolean updateTeam(TeamUpdateRequestDTO teamUpdateRequestDTO, User loginUser);


    /**
     *
     * 用户加入队伍
     *
     * @param teamJoinRequestDTO
     * @param loginUser
     * @return
     */
    boolean joinTeam(TeamJoinRequestDTO teamJoinRequestDTO, User loginUser);


    /**
     *
     *
     *
     * @param teamQuitRequestDTO
     * @param loginUser
     * @return
     */
    boolean quitTeam(TeamQuitRequestDTO teamQuitRequestDTO, User loginUser);


    public boolean deleteTeam(long id, User loginUser) ;
}
